package com.easy.dao;

import com.easy.bean.Rooms;
import com.easy.util.Page;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface IRoomsDao {

    int addRooms(Rooms rooms);

    @Insert("insert into rooms value()")
    int save(Rooms rooms);
    //获取
    Rooms getRooms(int id);
    //删除
    int delRooms(int id);
    //修改
    int editRooms(Rooms rooms);

    int editRooms_check(Rooms rooms);

    int edit(@Param("id") int id, @Param("rooms")Rooms rooms);

    List<Rooms> findfreeRooms(Rooms rooms);
    //查询
    List<Rooms> getSearchRooms(Rooms rooms);

    List<Rooms> getSearchRooms(@Param("rooms") Rooms rooms, @Param("page") Page page);

    int getCount(@Param("rooms")Rooms rooms);

    //图表
    List<Rooms> getAllRooms();
}
